package cn.com.guage.dtm.verify.service.impl;

import java.util.List;
import cn.com.guage.dtm.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import cn.com.guage.dtm.verify.mapper.VerifyTaskManageMapper;
import cn.com.guage.dtm.verify.domain.VerifyTaskManage;
import cn.com.guage.dtm.verify.service.IVerifyTaskManageService;
import cn.com.guage.dtm.common.core.text.Convert;

/**
 * 检核作业管理Service业务层处理
 * 
 * @author yangdechao
 * @date 2021-06-24
 */
@Service
public class VerifyTaskManageServiceImpl implements IVerifyTaskManageService 
{
    @Autowired
    private VerifyTaskManageMapper verifyTaskManageMapper;

    /**
     * 查询检核作业管理
     * 
     * @param taskId 检核作业管理ID
     * @return 检核作业管理
     */
    @Override
    public VerifyTaskManage selectVerifyTaskManageById(Long taskId)
    {
        return verifyTaskManageMapper.selectVerifyTaskManageById(taskId);
    }

    /**
     * 查询检核作业管理列表
     * 
     * @param verifyTaskManage 检核作业管理
     * @return 检核作业管理
     */
    @Override
    public List<VerifyTaskManage> selectVerifyTaskManageList(VerifyTaskManage verifyTaskManage)
    {
        return verifyTaskManageMapper.selectVerifyTaskManageList(verifyTaskManage);
    }

    /**
     * 新增检核作业管理
     * 
     * @param verifyTaskManage 检核作业管理
     * @return 结果
     */
    @Override
    public int insertVerifyTaskManage(VerifyTaskManage verifyTaskManage)
    {
        verifyTaskManage.setCreateTime(DateUtils.getNowDate());
        return verifyTaskManageMapper.insertVerifyTaskManage(verifyTaskManage);
    }

    /**
     * 修改检核作业管理
     * 
     * @param verifyTaskManage 检核作业管理
     * @return 结果
     */
    @Override
    public int updateVerifyTaskManage(VerifyTaskManage verifyTaskManage)
    {
        verifyTaskManage.setUpdateTime(DateUtils.getNowDate());
        return verifyTaskManageMapper.updateVerifyTaskManage(verifyTaskManage);
    }

    /**
     * 删除检核作业管理对象
     * 
     * @param ids 需要删除的数据ID
     * @return 结果
     */
    @Override
    public int deleteVerifyTaskManageByIds(String ids)
    {
        return verifyTaskManageMapper.deleteVerifyTaskManageByIds(Convert.toStrArray(ids));
    }

    /**
     * 删除检核作业管理信息
     * 
     * @param taskId 检核作业管理ID
     * @return 结果
     */
    @Override
    public int deleteVerifyTaskManageById(Long taskId)
    {
        return verifyTaskManageMapper.deleteVerifyTaskManageById(taskId);
    }
}
